package tt.dz.egobus.servicemanager.bean;

import java.util.ServiceLoader;

/**
 * @author Anson
 * @date 17-3-29
 * @name
 * @since 1.0.3
 */
public class DefaultSPIServiceLoader implements SPIServiceLoader {

    @Override
    public <T extends IdAlgorithm> ServiceLoader<T> serviceLoader(Class<T> clazz) {
        if(!clazz.isInterface()){
            return null;
        }
        ServiceLoader<T> serviceLoader = ServiceLoader.load(clazz);
        return serviceLoader;
    }
}
